#!/bin/bash
echo "***dependancy to sshpass package***"

if [ $# ==  0 ]
	then
	AMIDA="amida10k"
else
	if [ $# == 1 ]
		then
		AMIDA=$1
	else
		echo -e "Usage: $0\n $0 192.133.133.2"
		exit
	fi
fi
sshpass -p amida scp pprinter root@amida10k:/tmp
sshpass -p amida ssh root@$AMIDA "cd /var/pkgs ;echo Device ID : \`cat /proc/udid\`>/tmp/amida_ver.txt;ls *.info|sed -e \"s/-armel.info//g\">>/tmp/amida_ver.txt;cd /tmp;./pprinter -f /tmp/amida_ver.txt;rm amida_ver.txt pprinter"


